package org.webrx;

import java.util.Calendar;

public class Op6Demo {
    static int age;

    public static void main(String[] args) {
        //System.out.println(6=3);
        //int i = 10;
        //System.out.println(age);
        //System.out.println(i);
        //System.out.println(false && i=3);
        //System.out.println(i = 6);

        int num = true ? 10 : 100;
        System.out.println(num);


        //true ? System.out.println("yes") : System.out.println("No");
        String str = Math.random() > .5 ? "Yes" : "No";
        System.out.println(str);

        //Math.random() 返回随机double1.0-0.0 之间的随机小数
        System.out.println(Math.random() > .5 ? 1000 : 9999);

        var c = Calendar.getInstance();
        var h = c.get(Calendar.HOUR_OF_DAY);

        System.out.println(h < 12 ? "上午" : "下午");

        if(h<12){
            System.out.println("上午");
        }else{
            System.out.println("下午");
        }
    }
}
